package com.css.fxfzypg.modules.model.repository;

import com.css.fxfzypg.modules.baseData.entity.PbeEntity;
import com.css.fxfzypg.modules.model.entity.Casualty;
import com.css.fxfzypg.modules.model.entity.DataPbeInjuries;
import com.css.fxfzypg.modules.model.entity.DataPbeInjuriesVo;
import com.css.fxfzypg.modules.model.entity.DataPbeIntStrArea;
import com.css.fxfzypg.modules.model.to.CasualtyTO;

import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author DBJ
 */
public interface CasualtyRepository {

    public Map<String,Object> findPage(CasualtyTO casualtyTO, int curPage, int pageSize);

    Map<String,Object> findPageForXczh(CasualtyTO casualtyTO, int curPage, int pageSize);

    Casualty getModelById(String id);

    Casualty getDefaultModel();
    List<Casualty> getByDivision(String province, String city, int isNa);

    void save(Casualty casualty);

    void update(Casualty casualty);

    void delete(String userId, Date date, String id);

    Casualty getDefaultModel(String taskId);

    String getAreaIdByName(String area) throws UnsupportedEncodingException;

    List<PbeEntity> getAllPbeByTaskId(String taskId,int k,String range);

    void saveDataPbeInjuries(DataPbeInjuries pbeInjuries);

    void saveDataPbeIntStrArea(DataPbeIntStrArea pbeIntStrArea);

    void deleteByTaskId(String taskId);

    List<Map<String,Object>> getPbeInjuriesByTaskId(String taskId,String range);

    List<DataPbeInjuries> getPbeInjuries(String taskId,String dzIntensity);

    List<DataPbeInjuries> getTaskPbe(String taskId);

    Integer getTaskPbeCount(String taskId);

    void deleteDataPbeIntStrAreaByTaskId(String taskId);

    List<DataPbeIntStrArea> getDataPbeIntStrAreaByTaskId(String taskId,String destroy);

    Integer getDataPbeIntStrAreaCountByTaskId(String taskId, String destroy);

    List<DataPbeIntStrArea> getLimitListByTaskId(String taskId, String destroy, int fromIndex, int pageSize);

    DataPbeIntStrArea findByTaskIdLimit(String taskId);

    DataPbeInjuries findByTaskIdLimit2(String taskId);


    int batchupdate(List<DataPbeIntStrArea> pbeIntStrAreaList);

    int savepbeInjuriesList(List<DataPbeInjuries> list);

    void createFqRel(String taskId);

    void createInjuriesFqRel(String taskId);

    Integer countByProvince(String province);

    Integer countByYearPrefixLike(String taskYear, String prov);


    List<DataPbeInjuriesVo> getTaskPbeVo(String taskId);
}
